/**
 * The Selling Partner API for Sellers
 * The [Selling Partner API for Sellers](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) (Sellers API) provides essential information about seller accounts, such as:  - The marketplaces a seller can list in - The default language and currency of a marketplace - Whether the seller has suspended listings  Refer to the [Sellers API reference](https://developer-docs.amazon.com/sp-api/docs/sellers-api-v1-reference) for details about this API's operations, data types, and schemas.
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'

/**
 * The Marketplace model module.
 * @module sellers_v1/model/Marketplace
 * @version v1
 */
export class Marketplace {
  /**
   * Constructs a new <code>Marketplace</code>.
   * Information about an Amazon marketplace where a seller can list items and customers can view and purchase items.
   * @alias module:sellers_v1/model/Marketplace
   * @class
   * @param id {String} The encrypted marketplace value.
   * @param name {String} The marketplace name.
   * @param countryCode {String} The ISO 3166-1 alpha-2 format country code of the marketplace.
   * @param defaultCurrencyCode {String} The ISO 4217 format currency code of the marketplace.
   * @param defaultLanguageCode {String} The ISO 639-1 format language code of the marketplace.
   * @param domainName {String} The domain name of the marketplace.
   */
  constructor (id, name, countryCode, defaultCurrencyCode, defaultLanguageCode, domainName) {
    this.id = id
    this.name = name
    this.countryCode = countryCode
    this.defaultCurrencyCode = defaultCurrencyCode
    this.defaultLanguageCode = defaultLanguageCode
    this.domainName = domainName
  }

  /**
   * Constructs a <code>Marketplace</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {Marketplace} obj Optional instance to populate.
   * @return {Marketplace} The populated <code>Marketplace</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new Marketplace()
      if (data.hasOwnProperty('id')) { obj.id = ApiClient.convertToType(data.id, 'String') }
      if (data.hasOwnProperty('name')) { obj.name = ApiClient.convertToType(data.name, 'String') }
      if (data.hasOwnProperty('countryCode')) { obj.countryCode = ApiClient.convertToType(data.countryCode, 'String') }
      if (data.hasOwnProperty('defaultCurrencyCode')) { obj.defaultCurrencyCode = ApiClient.convertToType(data.defaultCurrencyCode, 'String') }
      if (data.hasOwnProperty('defaultLanguageCode')) { obj.defaultLanguageCode = ApiClient.convertToType(data.defaultLanguageCode, 'String') }
      if (data.hasOwnProperty('domainName')) { obj.domainName = ApiClient.convertToType(data.domainName, 'String') }
    }
    return obj
  }
}

/**
 * The encrypted marketplace value.
 * @member {String} id
 * @type {String}
 */
Marketplace.prototype.id = undefined

/**
 * The marketplace name.
 * @member {String} name
 * @type {String}
 */
Marketplace.prototype.name = undefined

/**
 * The ISO 3166-1 alpha-2 format country code of the marketplace.
 * @member {String} countryCode
 * @type {String}
 */
Marketplace.prototype.countryCode = undefined

/**
 * The ISO 4217 format currency code of the marketplace.
 * @member {String} defaultCurrencyCode
 * @type {String}
 */
Marketplace.prototype.defaultCurrencyCode = undefined

/**
 * The ISO 639-1 format language code of the marketplace.
 * @member {String} defaultLanguageCode
 * @type {String}
 */
Marketplace.prototype.defaultLanguageCode = undefined

/**
 * The domain name of the marketplace.
 * @member {String} domainName
 * @type {String}
 */
Marketplace.prototype.domainName = undefined
